﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace drawDong
{
    public partial class Form12 : Form
    {
        private string basePath = GlobalVariables.basePath;
        public Form12()
        {
            InitializeComponent();
        }

        private void Form12_Load(object sender, EventArgs e)
        {
            label2.Text = this.basePath;
            button1.Location = new Point(label2.Location.X + label2.Width, button1.Location.Y);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                string p = this.folderBrowserDialog1.SelectedPath;
                this.basePath = p;
                this.label2.Text = this.basePath;
                button1.Location = new Point(label2.Location.X + label2.Width, button1.Location.Y);
                Console.Write(p);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            GlobalVariables.basePath = this.basePath;
            this.Close();
        }
    }
}
